import { http } from "@/utils/http";

/** 抽奖活动列表
 * @param data   --  page pageSize actStatus  startTime endTime
 * @returns

 */
export const getLotteryActList = (data?: any) => {
  return http.request("post", "/admin/lottery/act/list", { data });
};

/** 抽奖活动详情
 * @param data   --  page pageSize actStatus  startTime endTime
 * @returns

 */
export const getLotteryActInfo = (data?: any) => {
  return http.request("post", "/admin/lottery/act/info", { data });
};

/** 抽奖活动添加
 * @param data   --
 */
export const addLotteryAct = (data?: any) => {
  return http.request("post", "/admin/lottery/act/add", { data });
};

/** 抽奖活动修改
 * @param data   --
 * @returns
 */
export const setLotteryAct = (data?: any) => {
  return http.request("post", "/admin/lottery/act/set", { data });
};
/**
 * 用户抽奖记录
 */
export const getLotteryRecordList = (data?: any) => {
  return http.request("post", "/admin/lottery/record/list", { data });
};
/**
 * 抽奖次数列表
 */
export const getLotteryCountList = (data?: any) => {
  return http.request("post", "/admin/lottery/draw/list", { data });
};

/** 
 * 给抽奖活动添加抽奖数量
 * @param data   --
 * {
    "actId":1,
    "userArr":[{
        "uId":1,
        "totalCount":2,
        "account":"1580289506"
    }]
}
 * @returns
 */
export const addLotteryCount = (data?: any) => {
  return http.request("post", "/admin/lottery/draw/add", { data });
};
/**
 * 领取商品 recordId
 */
export const prizeReceive = (data?: any) => {
  return http.request("post", "/admin/lottery/record/receive", { data });
};
